home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsgcc139_tar.Z / vmsgcc139_tar / include / varargs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  608 b   |  26 lines

  1. #ifndef __GNUC__
  2. /* Use the system's macros with the system's compiler.  */
  3. #include <varargs.h>
  4. #else
  5.  
  6. /* These macros implement traditional (non-ANSI) varargs
  7.    for GNU C.  */
  8.  
  9. #define va_alist  _varargs
  10. #define va_dcl    int _varargs;
  11. #define va_list   char *
  12.  
  13. #define va_count(count)        vaxc$va_count(&count)
  14.  
  15. #define va_start(AP)  AP=(char *) &_varargs
  16. #define va_end(AP)
  17.  
  18. #define _va_rounded_size(TYPE)  \
  19.   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
  20.  
  21. #define va_arg(AP, TYPE)                        \
  22.  (AP += _va_rounded_size (TYPE),                    \
  23.   *((TYPE *) (AP - _va_rounded_size (TYPE))))
  24.  
  25. #endif
  26.